import { search } from './searchClient/search'


/**
 * @param {{
 * data: [string, import('@/types/search').ItemResult[]]
 * }} data keyword and index
 */
onmessage = ({ data: [keyword, Result] }) => {
  postMessage(search(keyword, Result))
}